<template>
	<view class="app">
		<!-- 页面内容开始 -->
		<vk-mall-balance-card :value="$fn.priceFilter(vk.getVuex('$user.userInfo.account_reward.allow'))" title="可提现余额" value-tips="别急，余额获取中..." record-page="/pages/salesman/salesman-account-record"/>

		<view class="cell-group-view" style="padding:0rpx 10rpx;">
			<view class="cell-group-box">
				<u-cell-group :border="false">
					<u-cell-item icon="red-packet" title="前往提现" @click="pageTo('./withdrawal/apply')"></u-cell-item>
					<u-cell-item icon="order" title="查看提现记录" @click="pageTo('./withdrawal/apply-record')"></u-cell-item>
					<u-cell-item icon="plus" title="提现方式" @click="pageTo('./withdrawal/way-list')"></u-cell-item>
					<u-cell-item icon="red-packet" title="奖励明细" @click="pageTo('./salesman-account-record')"></u-cell-item>
				</u-cell-group>
			</view>
		</view>

		<!-- 页面内容结束 -->
		<!-- 全局公共浮球导航模块 -->
		<vk-data-float-ball :scroll-top="scrollTop"></vk-data-float-ball>
		<vk-data-loading v-model="loading" delayTime="0"></vk-data-loading>
	</view>
</template>

<script>
var vk = uni.vk; // vk依赖
export default {
	data() {
		// 页面数据变量
		return {
			// init请求返回的数据
			data: {
				userInfo: {},
			},
			// 表单请求数据
			form1: {},
			scrollTop: 0,
			loading: false
		};
	},
	onPageScroll(e) {
		this.scrollTop = e.scrollTop;
	},
	// 监听 - 页面每次【加载时】执行(如：前进)
	onLoad(options = {}) {
		vk = uni.vk;
		this.options = options;
		this.init(options);
	},
	// 监听 - 页面【首次渲染完成时】执行。注意如果渲染速度快，会在页面进入动画完成前触发
	onReady() {},
	// 监听 - 页面每次【显示时】执行(如：前进和返回) (页面每次出现在屏幕上都触发，包括从下级页面点返回露出当前页面)
	onShow() {},
	// 函数
	methods: {
		// 页面数据初始化函数
		init(options = {}) {
			let that = this;
			vk.callFunction({
				url: "client/user.getMyInfo",
				loading: true,
				data: {},
				success: (data) => {
					that.data = data;
				}
			});
		},
		// 页面跳转
		pageTo(path) {
			vk.navigateTo(path);
		}
	},
	// 计算属性
	computed: {}
};
</script>
<style lang="scss" scoped>
.cell {
	width: 100%;
	height: 120rpx;
	padding: 0 40rpx 0 44rpx;

	&:after {
		left: 40rpx;
		right: 40rpx;
		border-color: #e8e8e8;
	}

	.tit {
		flex: 1;
		font-size: 30rpx;
		color: #333;
	}

	.mix-icon {
		width: 64rpx;
		font-size: 40rpx;
	}

	.icon-qianbao {
		color: #3ed098;
	}

	.icon-tixian {
		color: #fe7c7a;
	}

	.icon-wodezhanghu_zijinjilu {
		font-size: 42rpx;
		color: #fbbe59;
	}

	.icon-you {
		width: auto;
		font-size: 24rpx;
		color: #999;
	}
}
</style>
